<!DOCTYPE html>
<html>
<head>
    <meta name="viewport"
          content="width=device-width,initial-scale=0.8,minimum-scale=0.8,maximum-scale=0.8,user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>统一登录</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.0/jquery.min.js"></script>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        html {
            height: 100%;
        }

        body {
            font-family: sans-serif;
            background-image: -webkit-linear-gradient(bottom, #323B55 0%, #424F71 100%);
            background-image: -moz-linear-gradient(bottom, #323B55 0%, #424F71 100%);
            background-image: -o-linear-gradient(bottom, #323B55 0%, #424F71 100%);
            background-image: -ms-linear-gradient(bottom, #323B55 0%, #424F71 100%);
            background-image: linear-gradient(bottom, #323B55 0%, #424F71 100%);
        }
    </style>
</head>
<body>

<div id="login_app">
    <form style="width: 360px;margin: 300px auto 0 auto;background: #fff;padding: 50px;border-radius: 10px"
          method="post" action="login">
        <input type="hidden" name="redirectUrl" id="redirectUrl">
        <div class="form-group">
            <label>用户登录名</label>
            <input type="text" class="form-control" name="loginName" placeholder="登录名">
        </div>
        <div class="form-group">
            <label>登录密码</label>
            <input type="password" class="form-control" name="loginPassword" placeholder="密码">
        </div>
        <div class="form-group">
            <img src="verifyImg" onclick="this.src='verifyImg?'+Math.random()" width="50%">
            <input type="text" name="verifyImg" placeholder="验证码" class="form-control" style="width: 50%;float: left;">
        </div>
        <button type="submit" class="btn btn-primary btn-block">登录</button>
    </form>
</div>

<script>
    var lot = location.search;
    var reg = new RegExp(".*redirectUrl\\s*=([^=&#]*)(?=&|#|).*", "g");
    $("#redirectUrl").val(decodeURIComponent(lot.replace(reg, "$1")))
</script>
</body>
</html>
